import React from "react";
import { ConnectedRouter as Router } from "react-router-redux";
import { Route, Switch, Redirect } from "react-router";
import {
  Login,
  Register,
  ForgetPassword,
  EmailPassword,
  Resume,
  Perfectresume
} from "../pages";

export default (history, navbar) => {
  const routes = (
    <Router keyLength={12} history={history}>
      <Switch>
        <Route exec path="/login" component={Login} />
        <Route exec path="/register" component={Register} />
        <Route exec path="/forgetPassword" component={ForgetPassword} />
        <Route exec path="/emailPassword" component={EmailPassword} />
        <Route exec path="/resume" component={Resume} />
        <Route exec path="/perfectResume" component={Perfectresume} />
        <Redirect to="/login" />
      </Switch>
    </Router>
  );
  return routes;
};
